extends CenterContainer




func _on_cancel_button_up():
	visible = false


# 添加种植土壤
func _on_soilTree_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/SoilTreeModal.tscn")
	ui.set_edit_data(null)

func _on_door_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapDoorModal.tscn")
	
	# 为了触发初始化 目标传送门选择逻辑
	ui.set_edit_data(null)


func _on_interactive_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapInteractiveModal.tscn")
	
	ui.set_edit_data(null)


func _on_prop_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapPropModal.tscn")

	ui.set_edit_data(null)


func _on_centerRecover_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapCenterRecoverModal.tscn")
	# 为了触发初始化 目标传送门选择逻辑
	ui.set_edit_data(null)


func _on_Npc_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapNpcModal.tscn")
	# 为了触发初始化 目标传送门选择逻辑
	ui.set_edit_data(null)


func _on_decoration_button_up():
	visible = false
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapDecorationModal.tscn")
	# 为了触发初始化 目标传送门选择逻辑
	ui.set_edit_data(null)


func _on_select_button_up():
	visible = false
	var map_view = MainTool.getUILayer().get_ui("MapView")
	var data = map_view.get_select_position_info()
	map_view.emit_select_signal(0, data)
	
	MainTool.getUILayer().pop_ui()


func _on_SelectRightMenu_visibility_changed():
	if visible:
		var map_view = MainTool.getUILayer().get_ui("MapView")
		$PanelContainer/VBoxContainer/select.visible = map_view.select_entity_mode
